package com.songcha.module_category

import android.app.Application
import android.content.Context
import com.alibaba.android.arouter.facade.annotation.Route
import com.alibaba.android.arouter.launcher.ARouter
import com.scwang.smart.refresh.header.MaterialHeader
import com.scwang.smart.refresh.layout.SmartRefreshLayout
import com.scwang.smart.refresh.layout.api.RefreshHeader
import com.scwang.smart.refresh.layout.api.RefreshLayout
import com.scwang.smart.refresh.layout.listener.DefaultRefreshHeaderCreator
import com.songcha.library_business.helper.SmartRefreshHelper
import com.songcha.library_business.provider.IApplicationInitProvider
import com.songcha.library_business.proxy.personal_recommend.PersonalRecommendManager
import com.songcha.library_common.BuildConfig
import com.songcha.library_common.LibraryCommon


class ModuleCategoryApplication : Application(),IApplicationInitProvider {
    companion object{
        lateinit var mContext:Context

        @JvmStatic
        fun init(application:Application){
            mContext=application
        }

    }

    override fun onCreate() {
        super.onCreate()
        mContext=this

        LibraryCommon.init(this)

        if(BuildConfig.DEBUG){
            ARouter.openLog()
            ARouter.openDebug()
        }
        ARouter.init(this)

        SmartRefreshHelper.init()
    }

    override fun initApplication(application: Application) {
        //init(application)
        ModuleCategoryApplication.init(application)
    }

    override fun init(context: Context?) {

    }


}